<#include "/admin/utils/ui.ftl"/>
<@layout>

<section class="content-header">
    <h1>人口管理</h1>
    <ol class="breadcrumb">
        <li><a href="${base}/admin">首页</a></li>
        <li class="active">人口管理</li>
    </ol>
</section>
<section class="content container-fluid">
    <div class="row">
        <div class="col-md-12">
            <div class="box">
                <div class="box-header with-border">
                    <h3 class="box-title">人口管理</h3>
                    <div class="box-tools">
                        <div class="upload-btn">
                            <label style="width: 80px; margin: 0;">
                                <span class="upload_btn1">新增人口</span>

                            </label>
                        </div>
                    </div>
                </div>
                <div class="box-body">
                    <ul class="mailbox-attachments clearfix">
                        <#list themes as row>
                        <li>
                            <a href="/admin/theme/edit?id=${row.id}" target="_blank" class="mailbox-attachment-name">
                            <span class="mailbox-attachment-icon no-padding">
                                <img src="<@resource src=row.url/>" style="width: 100%; height: 132px;"/>
                            </span>
                            <div class="mailbox-attachment-info">

                                <span class="mailbox-attachment-size">
                                    姓名: ${row.name!'-'}

                                </span>

                                    <i >地址</i> ${row.adress}

                                <#if (row.party_member == 1)>
                                    <span class="mailbox-attachment-size" style="color: red">党员</span>
                                <#else>
                                    <span class="mailbox-attachment-size" style="color: black">不是党员</span>
                                </#if>
                            </a>
                            </div>
                        </li>
                        </#list>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</section>
<script type="text/javascript">
    $(function () {
        $('a[data-action="toggle"]').click(function () {
            var that = $(this);
            var value = that.data('value');
            $.getJSON('${base}/admin/theme/active', {'theme': value}, function (json) {
                layer.alert(json.message, function(){
                    location.reload();
                });
            })
        });
        $('.upload_btn1').click(function () {
            location.href="/admin/theme/edit?id=0";
        });

    })
</script>
</@layout>
